import { http } from '@/utils/http'

export interface IMpLoginParams {
  openid: string
  password: string
  username: string
  isDriver: boolean
}

export interface IChargeStore {
  storeCode: string
  storeName: string
  notAuditCornerData: number
  notCommitCornerData: number
  notPayCornerData: number
  notRevievrCornerData: number
  notShipCornerData: number
  shcornerData: number
  unpayAmount: number
}

export interface IMpLoginResult {
  userinfo: {
    username: string
    avatar: string
    chargeStore: IChargeStore[] | any
  }
  token: string
}

export const mplogin = (data: IMpLoginParams) => {
  return http.post<IMpLoginResult>('/jeecg-boot/htmmp/main/mplogin', data)
}
